<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) 
##########################################
##### Autor: Yngrid Coello           #####
##### Correo: y-c-@hotmail.com       #####
##### Ult. Modif: 26/10/2011         #####
##### Pasantias de Grado - USB       #####
##### Realización del Sistema: 0Bs   #####
##########################################?>

<form action="<?php echo url_for('proveedor/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?rif='.$form->getObject()->getRif() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
<?php echo $form['_csrf_token']->render(); ?>
<?php echo $form->renderHiddenFields(); ?>
<b>Datos Generales</b>
<div id="datosServicio">
    <table>
        <tr>
            <?php echo $form['rif']->renderError() ?>
            <td style="text-align:right">
                <b>RIF:</b>
            </td>
            <td>
                 <?php echo $form['rif'] ?>
            </td>
        </tr>
        <tr>
            <?php echo $form['nombre']->renderError() ?>
            <?php echo $form['tipo']->renderError() ?>
            <td style="text-align:right">
                <b>Nombre:</b>
            </td>
            <td>
                 <?php echo $form['nombre'] ?>
            </td>
            <td style="text-align:right">
                <b>Tipo:</b>
            </td>
            <td>
                <?php echo $form['tipo'] ?>
            </td>
        </tr>
        <tr>
            <?php echo $form['direccion']->renderError() ?>
            <?php echo $form['tlf']->renderError() ?>
            <td style="text-align:right">
                <b>Direcci&oacute;n:</b>
            </td>
            <td>
                <?php echo $form['direccion'] ?>
            </td>
            <td style="text-align:right">
                <b>Tlf:</b>
            </td>
            <td>
                <?php echo $form['tlf'] ?>
            </td>
        </tr>
        <tr>
            <?php echo $form['logotipo']->renderError() ?>
            <td style="text-align:right">
                <b>Logotipo:</b>
            </td>
            <td>
                <?php echo $form['logotipo'] ?><input type="button" value="Examinar" />
            </td>
        </tr>
    </table>
  <div id="totales">
    <table>
        <tr>
            <?php echo $form['contacto']->renderError() ?>
            <?php echo $form['tlfContacto']->renderError() ?>
            <td style="text-align:right">
                <b>Persona de Contacto:</b>
            </td>
            <td>
                <?php echo $form['contacto'] ?>
            </td>
            <td style="text-align:right">
                <b>Tlf:</b>
            </td>
            <td>
                <?php echo $form['tlfContacto'] ?>
            </td>
        </tr>
    </table>
  </div>
    
</div>
<b>Caracter&iacute;sticas de la Factura</b>
<div id="detalleFactura">
    <table>
        <tr>
            <td style="text-align:right">
                <b>U. Medida:</b>
            </td>
            <td WIDTH="150px">
                <?php echo $form['uMedida'] ?>
            </td>
            <td style="text-align:right">
                <b>Moneda:</b>
            </td>
            <td>
                <?php echo $form['moneda'] ?>
            </td>
        </tr>
    </table>
</div>
<br>

  <center><button type="button" onclick="location.href = '<?php echo url_for('proveedor/index') ?>'">Regresar</button>
  <input type="submit" id="guardar" value="Guardar" /></center>

</form>
<br>
<?php if ($sf_user->hasFlash('error')): ?>
	<script>
		alert('<?php echo $sf_user->getFlash('error'); ?>');
	</script>
<?php endif; ?>
